<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">    <link rel="stylesheet" href="jgp/css/ui-color.css">
    <link rel="stylesheet" href="jgp/css/ui-res.css">
    <link rel="stylesheet" href="jgp/css/ui-input.css">
    <link rel="stylesheet" href="jgp/css/ui-base.css">
    <link rel="stylesheet" href="jgp/css/ui-box.css">
    <link rel="stylesheet" href="jgp/css/project/style.css">
	<link rel="stylesheet" href="jgp/css/my.css">
	<link rel="stylesheet" href="jgp/css/iBox.css">
	
	
	<script src="jgp/js/zy_tmpl.js"></script>
	<script src="jgp/js/zy_control.js"></script>
    <script src="jgp/js/zy_click.js"></script>
    <script src="jgp/js/common.js"></script>
    <script src="jgp/js/zy_json.js"></script>
    <script src="jgp/js/zy_event.js"></script>
	<script src="jgp/js/peibeidan.js"></script>
	<script src="jgp/js/jquery-1.8.3.min.js"></script>
	<script src="jgp/js/pbd.js"></script>
	<script src="jgp/js/iBox.js"></script>
	<script src="js/talkingdata.js"></script>
</head>
<body id="body" class="um-vp  ub-ver " ontouchstart>
            <div class="ub  t-bla umar-l umar-t umar-b">
                <div class=" uinn uc-l1 " style="width: 35%;background-color: RGB(88,128,162)">
                    <div  class="ub-f1 uinn1 ulev-1 uc-l1">清洁人员</div>
                </div>
               <div class="uinn1 ub-f1 ub ub-ac ub-pc uc-r1 t-wh ubt ubb ubr ">
                   <input id="cleaner" type="text" style="width: 92%;border: none;background: none" class="uinn tx-c"/>
                </div>
            </div>
            <div class="ub  t-bla umar-l umar-t umar-b">
                <div class=" uinn uc-l1 c-wh " style="width: 35%;background-color: RGB(88,128,162)">
                    <div  class="ub-f1 uinn1 ulev-1 uc-l1">上机时间</div>
                </div>
               <div class=" uinn1 ub-f1 ub ub-ac ub-pc uc-r1 t-wh ubt ubb ubr ">
                    <div class="date cu" id="arrivalTime"></div>
                    <button id="arrivalTimeButton" onclick="getLaoclTime('arrivalTime')"  style="background-color: RGB(88,128,162);border:none" class="uinn t-wh  umar-l">提  交</button>
                </div>
            </div>
            <div class="ub  t-bla  umar-l umar-t umar-b">
                <div class=" uinn uc-l1 c-wh " style="width: 35%;background-color: RGB(88,128,162)">
                    <div  class="ub-f1 uinn1 ulev-1 uc-l1">到位时间</div>
                </div>
               <div class=" uinn1 ub-f1 ub ub-ac ub-pc uc-r1 t-wh ubt ubb ubr ">
                     <div class="date cu" id="boardTime"></div>
                     <button id="boardTimeButton" onclick="getLaoclTime('boardTime')"  style="background-color: RGB(88,128,162);border:none" class="uinn t-wh  umar-l">提  交</button>
                </div>
            </div>
            <div class="ub  t-bla  umar-l umar-t umar-b">
                <div class=" uinn uc-l1 c-wh " style="width: 35%;background-color: RGB(88,128,162)">
                    <div  class="ub-f1 uinn1 ulev-1 uc-l1">机组确认时间</div>
                </div>
               <div class=" uinn1 ub-f1 ub ub-ac ub-pc uc-r1 t-wh ubt ubb ubr ">
                     <div class="date cu" id="board2Time"></div>
                     <button id="board2TimeButton" onclick="getLaoclTime('board2Time')"  style="background-color: RGB(88,128,162);border:none" class="uinn t-wh  umar-l">提  交</button>
                </div>
            </div>
             <div class="ub  t-bla  umar-l umar-t umar-b">
                <div class=" uinn uc-l1 c-wh " style="width: 35%;background-color: RGB(88,128,162)">
                    <div  class="ub-f1 uinn1 ulev-1 uc-l1">完成时间</div>
                </div>
               <div class=" uinn1 ub-f1 ub ub-ac ub-pc uc-r1 t-wh ubt ubb ubr ">
                     <div class="date cu" id="finishTime"></div>
                    <button id="finishTimeButton" onclick="getLaoclTime('finishTime')"  style="background-color: RGB(88,128,162);border:none" class="uinn t-wh  umar-l">提  交</button>
                </div>
            </div>
             <div class="ub  t-bla  umar-l umar-t umar-b">
                <div class=" uinn uc-l1 c-wh " style="width: 35%;background-color: RGB(88,128,162)">
                    <div  class="ub-f1 uinn1 ulev-1 uc-l1">客舱清洁人员</div>
                </div>
               <div class=" uinn1 ub-f1 uc-r1 ub ub-ac ub-pc t-wh ubt ubb ubr ">
                     <input  id="cabinCleaner" type="text" style="width: 92%;border: none;background: none;" class="uinn tx-c"/>
                </div>
            </div>
             <div class="ub  t-bla  umar-l umar-t umar-b">
                <div class=" uinn uc-l1 c-wh " style="width: 35%;background-color: RGB(88,128,162)">
                    <div  class="ub-f1 uinn1 ulev-1 uc-l1">质检人员</div>
                </div>
               <div class=" uinn1 ub-f1 uc-r1 ub ub-ac ub-pc t-wh ubt ubb ubr ">
                     <input id="cabinCleaner1" type="text" style="width: 92%;border: none;background: none" class="uinn tx-c"/>
                </div>
            </div>
            <div class="ub " id="footer" style="position: fixed;bottom: 0;width: 100%;background-color: RGB(33,141,213)">
                <div ontouchstart="zy_touch('')" onClick="" class="ub-f1 ub ub-pe ub-ver" id="tab-0" link="main">
                    <div class="ub ub-ac ub-pc">
                        <div class="ub-img img5"></div>
                    </div>
                    <div onclick="saveClean()" class="ub ub-ac ub-pc t-wh ubt ubr" style="height: 2em"  >提交</div>
                </div>
            </div>
</body>
<script>
zy_init();
window.uexOnload=function(type){
    if(!type){
       var pbd = getStorage("pbdh");
       var arrivalTime =  getStorage(pbd+"arrivalTime");
       if(arrivalTime!=undefined&&arrivalTime!=""){
          $("#arrivalTime").html(arrivalTime);
          $("#arrivalTimeButton").attr("class","uhide");
       }
       var boardTime =  getStorage(pbd+"boardTime");
       if(boardTime!=undefined&&boardTime!=""){
          $("#boardTime").html(boardTime);
          $("#boardTimeButton").attr("class","uhide");
       }
       var board2Time =  getStorage(pbd+"board2Time");
       if(board2Time!=undefined&&board2Time!=""){
          $("#board2Time").html(board2Time);
          $("#board2TimeButton").attr("class","uhide");
       }
       var finishTime =  getStorage(pbd+"finishTime");
       if(finishTime!=undefined&&finishTime!=""){
          $("#finishTime").html(finishTime);
          $("#finishTimeButton").attr("class","uhide");
       }
       var cleaner =  getStorage(pbd+"cleaner");
       if(cleaner!=undefined&&cleaner!=""){
          $("#cleaner").val(cleaner).attr("readonly","readonly");
       }
       var cabinCleaner =  getStorage(pbd+"cabinCleaner");
       if(cabinCleaner!=undefined&&cabinCleaner!=""){
          $("#cabinCleaner").val(cleaner).attr("readonly","readonly");
       }
       var cabinCleaner1 =  getStorage(pbd+"cabinCleaner1");
       if(cabinCleaner1!=undefined&&cabinCleaner1!=""){
          $("#cabinCleaner1").val(cleaner).attr("readonly","readonly");
       }
    }
}
    iP = {}; 
      function getLaoclTime(id){
          var newdate = new Date();
          var newtimems = newdate.getTime();
          var time = iG.getDateToday(newdate)+"T"+iG.getHours(newdate)+":"+iG.getMinutes(newdate)+":"+newdate.getSeconds();
          $("#"+id).html(time);
          $("#"+id+"Button").attr("class","uhide");
          saveClean();
          // var pbd = getStorage("pbdh");
          // setStorage(pbd+id,time);
          
      } 

      //更新配备单
        function saveClean(){
            var arrivalCode= getStorage("ARRTO");//目的地
            var carrier =  getStorage("HBH").substring(0,2);//承运人
            var departCode = getStorage("DEPTO");//起飞地
            var flightDate = getStorage("dateTime");//飞行日期
            var flightNo = getStorage("HBH").substring(2);//航班号      
            var cleanInfo={    
            "cleaner": $("#cleaner").val(),
            "arrivalTime": $("#arrivalTime").text(),
            "boardTime": $("#boardTime").text(),
            "finishTime": $("#finishTime").text(),
            "cabinCleaner": $("#cabinCleaner").val()
           };
            var jsonToSer ={'arrivalCode':arrivalCode,'carrier':carrier,'departCode':departCode,'flightDate':flightDate,'flightNo':flightNo,'cleanInfo':cleanInfo};
            var param1  = {"jsonDate":JSON.stringify(jsonToSer)};
            $.ajax({
            url : saveCleanInfo,
            type : "post",
            data : param1,
            dataType:"json",   
            success: function(data){
                     if (data.status==0) {
                        var pbd = getStorage("pbdh");
                        setStorage(pbd+"cleaner",$("#cleaner").val());
                        setStorage(pbd+"arrivalTime",$("#arrivalTime").text());
                        setStorage(pbd+"boardTime",$("#boardTime").text());
                        setStorage(pbd+"board2Time",$("#board2Time").text());
                        setStorage(pbd+"finishTime",$("#finishTime").text());
                        setStorage(pbd+"cabinCleaner",$("#cabinCleaner").val());
                        setStorage(pbd+"cabinCleaner1",$("#cabinCleaner1").val());
                         $.iBoxMsg(data.msg);
                        }else if(data.status==-1){
                           alert(data.msg);
                        }else{
                             $.iBoxMsg("网络异常，请重试");
                        }
                   },
                   error: function(data){
                     $.iBoxMsg("网络异常，请稍后重试！");
                   }
                })
        }
        </script>
</html>
